<LayoutTableSmall>
    <!-- 其他 -->
    <template slot="other"></template>
    <!-- 搜索 -->
    <template slot="search">
    </template>
    <!-- 功能 -->
    <template slot="function">
        <!-- 添加的权益为自定义  写死权益类型4 -->
        <el-button type="primary" @click="editBoxOpen({type:'add',rightType:'4'})">添加权益</el-button>
    </template>
    <!-- 表格 -->
    <template slot="table">
        <el-table v-loading="mixinTable_loading" :data="mixinTable_tableData" border style="width: 100%;"
            :ref="mixinPage_vueName+'TableSmall'" default-expand-all height="100%" row-key="id"
            @selection-change="mixinTable_handleSelectionChangeTableSmall">
            <el-table-column type="selection" width="50" align="center"></el-table-column>
            <el-table-column type="index" width="50" :index="mixinTable_indexMethod" align="center" label="#">
            </el-table-column>
            <el-table-column prop="rightName" label="权益名称"></el-table-column>
            <el-table-column label="类型">
                <template slot-scope="scope">
                    <div>
                        {{scope.row.rightType | getType}}
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="状态">
                <template slot-scope="scope">
                    <el-switch v-model="scope.row.isOpen" :active-value="1" :inactive-value="0"
                        @change="statusChange({id:scope.row.id,isOpen:scope.row.isOpen,rightName:scope.row.rightName})">
                    </el-switch>
                </template>
            </el-table-column>

            <el-table-column label="操作" width="200" align="center">
                <template slot-scope="scope">
                    <el-button v-if="scope.row.rightType === 4"
                        @click="editBoxOpen({type:'update',id:scope.row.id,rightType:'scope.row.rightType'})">
                        编辑
                    </el-button>
                    <el-button v-if="scope.row.rightType !== 4" @click="setRule({id:scope.row.id})">
                        设置规则
                    </el-button>

                    <el-button type="danger" plain @click="mixinTable_selectTableDeleteData([scope.row])"
                        v-if="scope.row.rightType === 4">
                        删除
                    </el-button>

                </template>
            </el-table-column>
        </el-table>
    </template>
    <!-- 表格选项 -->
    <template slot="options">
        <el-button :disabled="mixinTable_selectTableData.length<=0" @click="mixinTable_selectTableDeleteData()">
            删除已选</el-button>
        <el-button :disabled="mixinTable_selectTableData.length<=0"
            @click="mixinTable_clearSelectionChangeTableSmall()">取消选择
        </el-button>
    </template>
    <!-- 分页 -->
    <template slot="page">
        <el-pagination class="paginationStyle" v-if="mixinTable_pageData.total>0" background
            @current-change="mixinTable_pagingData($event)" :current-page="mixinTable_pageData.pageNum"
            :page-size.sync="$vFN.Constants.pageSize" layout="total, prev, pager, next,jumper"
            :total.sync="mixinTable_pageData.total">
        </el-pagination>
    </template>
</LayoutTableSmall>